#include <jni.h>
#include <string.h>

jstring Java_com_auo_androidinjectso_MainActivity_stringFromJNI(JNIEnv* env, jobject thiz, jstring jstr) {

	const char *str = (*env) -> GetStringUTFChars(env, jstr, 0);

	if(strlen(str) == 10) {
		(*env)->ReleaseStringUTFChars(env, jstr, str);
		return (*env)->NewStringUTF(env, "Hook success");
	}
	else {
		(*env)->ReleaseStringUTFChars(env, jstr, str);
		return (*env)->NewStringUTF(env, "Hello from JNI");
	}
}